import requests
import re
import shutil
import os
from util.headers import get_header


url='https://movie.douban.com/top250'

res = requests.get(url,headers=get_header())
print(res.text)
data_all=re.findall(r'<div class="pic">.*? href="(.*?)".*?alt="(.*?)" src="(.*?)">.*?</div>',res.text,re.S)
print(data_all)
for data in data_all:
    link = data[0]
    title = data[1]
    img_url=data[2]
    detail_response=requests.get(link,headers=get_header())
    print(detail_response.text)
    break

